package cn.stylefeng.guns.modular.system.model;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 商品
 * </p>
 *
 * @author baikun
 * @since 2020-04-14
 */
@TableName("my_mer")
public class Mer extends Model<Mer> {

    private static final long serialVersionUID = 1L;

    /**
     * ID号
     */
    private Integer id;
    /**
     * 商品类别
     */
    @TableField("category")
    private Integer category;
    /**
     * 商品名称
     */
    @TableField("mername")
    private String mername;

    /**
     * 商品成本
     */
    @TableField("cost")
    private BigDecimal cost;

    /**
     * 商品价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 商品数量
     */
    @TableField("quantity")
    private String quantity;

    /**
     * 商品单位
     */
    @TableField("unit")
    private String unit;

    /**
     * 商品型号
     */
    @TableField("mermodel")
    private String mermodel;
    /**
     * 商品图片
     */
    @TableField("picture")
    private String picture;
    /**
     * 商品描述
     */
    @TableField("merdesc")
    private String merdesc;
    /**
     * 生产厂家
     */
    @TableField("manufacturer")
    private String manufacturer;
    /**
     * 生产日期
     */
    @TableField("leavefactorydate")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date leavefactorydate;

    /**
     * 添加日期
     */
    @TableField("createtime")
    private Date createtime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getMername() {
        return mername;
    }

    public void setMername(String mername) {
        this.mername = mername;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getMermodel() {
        return mermodel;
    }

    public void setMermodel(String mermodel) {
        this.mermodel = mermodel;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getMerdesc() {
        return merdesc;
    }

    public void setMerdesc(String merdesc) {
        this.merdesc = merdesc;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public Date getLeavefactorydate() {
        return leavefactorydate;
    }

    public void setLeavefactorydate(Date leavefactorydate) {
        this.leavefactorydate = leavefactorydate;
    }

    public Date getCreatetime() { return createtime; }

    public void setCreatetime(Date createtime) { this.createtime = createtime; }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public String getQuantity() {
        return quantity;
    }

    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Mer{" +
        ", id=" + id +
        ", category=" + category +
        ", mername=" + mername +
        ", cost=" + cost +
        ", price=" + price +
        ", quantity=" + quantity +
        ", unit=" + unit +
        ", mermodel=" + mermodel +
        ", picture=" + picture +
        ", merdesc=" + merdesc +
        ", manufacturer=" + manufacturer +
        ", leavefactorydate=" + leavefactorydate +
        ", createtime=" + createtime +
        "}";
    }
}
